וַיֹּ֣אמֶר־אֱלֹהִ֣ים ׀ לִשְׁלֹמֹ֡ה יַ֣עַן אֲשֶׁר֩ הָיְתָ֨ה זֹ֜את עִם־לְבָבֶ֗ךָ וְלֹֽא־שָׁ֠אַלְתָּ עֹ֣שֶׁר נְכָסִ֤ים וְכָבוֹד֙ וְאֵת֙ נֶ֣פֶשׁ שֹׂנְאֶ֔יךָ וְגַם־יָמִ֥ים רַבִּ֖ים לֹ֣א שָׁאָ֑לְתָּ וַתִּֽשְׁאַל־לְךָ֙ חָכְמָ֣ה וּמַדָּ֔ע אֲשֶׁ֤ר תִּשְׁפּוֹט֙ אֶת־עַמִּ֔י אֲשֶׁ֥ר הִמְלַכְתִּ֖יךָ עָלָֽיו׃
Rashi on II Chronicles
Since this was in your heart For a person does not request this thing unless he has the fear of Heaven in his heart, as it is stated (Ex. 18:21): “But you must seek out from the people men of ability, God-fearing men.”